#pragma once
// Idea behind input interface is to easly swith between keyboard, keyboard and mouse and controller devices, 
//as well as determine up front what is posible to do with controller - future proof for AI as well

struct InputController {
	enum InputType {
		KEYBOARD,
		KEYBOARDMOUSE,
		CONTROLLER,
		AI,
		ONLINE
	};
};

enum {
	SPACE,
	ESC
} InputValidKeys;

class InputInterface {
	InputController::InputType m_inputDevice;
	
	bool exitButton;

public:
	InputInterface() {
		m_inputDevice = InputController::KEYBOARD;
		exitButton = false;
	}

	~InputInterface() {}

	void setInputDevice(InputController::InputType it) { m_inputDevice = it; }
	InputController::InputType getInputDevice() { return m_inputDevice; }

	void update() {

		if(glfwGetKey(GLFW_KEY_ESC) == GLFW_PRESS && m_inputDevice != InputController::AI)
		{
			exitButton = true;
		}else{
			exitButton = false;
		}
	}

	bool isExitButtonReleased() { return exitButton; }
};
